﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SSRSViewer.Core;

namespace SSRSViewer.Win
{
	partial class IntegerParameterUserControl : UserControl, IParameterEditor, IIntegerParameterUserControl
	{
		public IntegerParameterUserControl()
		{
			InitializeComponent();
		}

		public void Initialize() { }

		#region IParameterEditor Members

		public object EditValue
		{
			get { return Convert.ToInt32(editor.Value); }
			set
			{
				if (value is int)
					editor.Value = Convert.ToInt32(value);
				else
					throw new InvalidCastException("Looking for a value of type 'Int'");
			}
		}
		public string Prompt
		{
			get { return lbPrompt.Text; }
			set { lbPrompt.Text = value; }
		}
		public RdlReportParameter EditingParameter { get; set; }
		#endregion
	}
}
